package cc.lj.internal.api.ordershare.api;

import cc.lj.internal.api.core.config.FeignConfiguration;
import cc.lj.internal.api.ordershare.api.fallbackfactory.OrderOnlineFeignServiceFallbackFactory;
import cc.lj.internal.api.ordershare.dto.OrderOnlineAPIDTO;
import cc.lj.internal.core.exception.SysExceptionEnum;
import cc.lj.internal.core.http.HttpResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotBlank;

/**
 * 订单表对外接口
 * @author liangxifeng
 * @date 2023/6/25 15:09
 */
@FeignClient(contextId = "f-lj-internal-ordershare-orderOnlineFeignService",
        name = "lj-internal-ordershare",
//        url = "http://192.168.15.110:8052", //后续如果使用nacos服务发现，则将改行去掉即可
        url = "${feign.ordershareUrl}",
        path = "orderOnline",
        configuration = {FeignConfiguration.class},
        fallbackFactory = OrderOnlineFeignServiceFallbackFactory.class
)
public interface OrderOnlineFeignService {
    /**
     * 根据合同号查询订单数据
     * @param pactNum
     * @return 订单数据
     */
    @GetMapping("/getByPactNum")
    HttpResult<OrderOnlineAPIDTO> getByPactNum(@RequestParam String pactNum);
}
